4 // Copyright (c) 2006 Microsoft Corporation. All rights reserved.
6 // The use and distribution terms for this software are contained in the file
7 // named license.txt, which can be found in the root of this distribution.
8 // By using this software in any fashion, you are agreeing to be bound by the
9 // terms of this license.
11 // You must not remove this notice, or any other, from this software.
16 //*************************************************************************************
19 // Contain the definitons of all the extra interfaces needed to make IActiveScript work
20 //*************************************************************************************
22 namespace Microsoft
.JScript
{
24 using Microsoft
.JScript
.Vsa
;
27 using System
.Reflection
;
28 using System
.Reflection
.Emit
;
29 using System
.Runtime
.InteropServices
;
30 using System
.Security
;
31 using System
.Security
.Permissions
;
33 //*************************************************************************************
36 // Implemented by the VsaEngine, provide the extra functionality needed by an
38 //*************************************************************************************
39 [System
.Runtime
.InteropServices
.GuidAttribute("BFF6C97F-0705-4394-88B8-A03A4B8B4CD7")]
40 [System
.Runtime
.InteropServices
.ComVisible(true)]
41 public interface IEngine2
{
42 System
.Reflection
.Assembly
GetAssembly();
43 [PermissionSetAttribute(SecurityAction
.LinkDemand
, Name
= "FullTrust")]
44 void Run(System
.AppDomain domain
);
46 [PermissionSetAttribute(SecurityAction
.LinkDemand
, Name
= "FullTrust")]
48 [PermissionSetAttribute(SecurityAction
.LinkDemand
, Name
= "FullTrust")]
49 void DisconnectEvents();
50 [PermissionSetAttribute(SecurityAction
.LinkDemand
, Name
= "FullTrust")]
52 [PermissionSetAttribute(SecurityAction
.LinkDemand
, Name
= "FullTrust")]
53 void RegisterEventSource(String name
);
54 [PermissionSetAttribute(SecurityAction
.LinkDemand
, Name
= "FullTrust")]
56 [PermissionSetAttribute(SecurityAction
.LinkDemand
, Name
= "FullTrust")]
57 void InitVsaEngine(String rootMoniker
, IVsaSite site
);
58 IVsaScriptScope
GetGlobalScope();
60 [PermissionSetAttribute(SecurityAction
.LinkDemand
, Name
= "FullTrust")]
61 IVsaEngine
Clone(System
.AppDomain domain
);
62 [PermissionSetAttribute(SecurityAction
.LinkDemand
, Name
= "FullTrust")]
66 //*************************************************************************************
69 // Implemented by the IActiveScript site, provide the extra functionality needed by
71 //*************************************************************************************
72 [System
.Runtime
.InteropServices
.GuidAttribute("BFF6C980-0705-4394-88B8-A03A4B8B4CD7")]
73 [InterfaceType(ComInterfaceType
.InterfaceIsIUnknown
)]
74 [System
.Runtime
.InteropServices
.ComVisible(true)]
75 public interface ISite2
{
76 Object
[] GetParentChain(Object obj
);
80 //*************************************************************************************
83 // Extendion to the types of Item Type available
84 //*************************************************************************************
85 [System
.Runtime
.InteropServices
.GuidAttribute("581AD3D9-2BAA-3770-B92B-38607E1B463A")]
86 [System
.Runtime
.InteropServices
.ComVisible(true)]
87 public enum VSAITEMTYPE2
{
96 //*************************************************************************************
99 // What was known to be a module in the IActiveScript interface. This functionality
100 // is what behavior in IE will use.
101 //*************************************************************************************
102 [System
.Runtime
.InteropServices
.GuidAttribute("ED4BAE22-2F3C-419a-B487-CF869E716B95")]
103 [System
.Runtime
.InteropServices
.ComVisible(true)]
104 public interface IVsaScriptScope
: IVsaItem
{
105 IVsaScriptScope Parent{ get; }
107 IVsaItem
AddItem(string itemName
, VsaItemType type
);
108 IVsaItem
GetItem(string itemName
);
109 void RemoveItem(string itemName
);
110 void RemoveItem(IVsaItem item
);
113 IVsaItem
GetItemAtIndex(int index
);
114 void RemoveItemAtIndex(int index
);
117 IVsaItem
CreateDynamicItem(string itemName
, VsaItemType type
);
121 //*************************************************************************************
124 // Used by the authoring environment to get extra information about errors
125 //*************************************************************************************
126 [System
.Runtime
.InteropServices
.GuidAttribute("DC3691BC-F188-4b67-8338-326671E0F3F6")]
127 [System
.Runtime
.InteropServices
.ComVisible(true)]
128 public interface IVsaFullErrorInfo
: Microsoft
.Vsa
.IVsaError
{